Foxit PDF RDK
FoxitRDKNative.XFAWidget Class Reference

Public Member Functions

 GetBitmap ()
 Get the bitmap of current XFA widget. More...
 
 GetDefaultValue ()
 Get the default value string. More...
 
 GetHAlign ()
 Get text horizontal alignment. More...
 
 GetIndex ()
 Get the index of XFA Widget in related XFA page. More...
 
 GetName (type)
 Get Widget name. More...
 
 GetOptions ()
 Get options of a choice list or an Exclusion Group (for radion button only). More...
 
 GetPresence ()
 Get the presence property of the XFA widget. More...
 
 GetRect ()
 Get rectangle of XFA widget. More...
 
 GetSignature ()
 Get the signature object from current XFA widget. More...
 
 GetToolTip ()
 Get tooltip string. More...
 
 GetType ()
 Get type of XFA widget. More...
 
 GetVAlign ()
 Get text vertical alignment. More...
 
 GetValue ()
 Get the value string. More...
 
 GetXFAPage ()
 Get the related XFA page, to which current XFA widget belongs. More...
 
 HasEdge (edge_pos)
 Check if the edge for specified position exists. More...
 
 IsChecked ()
 Check if current XFA widget is checked. More...
 
 IsListBox ()
 Check whether the widget is listbox or not. More...
 
 IsSupportMultiline ()
 Check whether the widget supports multiple lines. More...
 
 IsSupportMultiSelect ()
 Check whether the widget supports multiple selections. More...
 
 OnChar (input_char, flags)
 Call this function when a character code is being input. More...
 
 OnHitTest (point)
 Call this function to do hit test for a specified point. More...
 
 OnKeyDown (key_code, flags)
 Call this function when key on the keyboard is down. More...
 
 OnKeyUp (key_code, flags)
 Call this function when key on the keyboard is up. More...
 
 OnLButtonDoubleClick (point, flags)
 Call this function when left mouse button is double-clicked . More...
 
 OnLButtonDown (point, flags)
 Call this function when left mouse button is down. More...
 
 OnLButtonUp (point, flags)
 Call this function when left mouse button is up. More...
 
 OnMouseEnter ()
 Call this function when mouse enters current XFA widget. More...
 
 OnMouseExit ()
 Call this function when mouse exits. More...
 
 OnMouseMove (point, flags)
 Call this function when mouse moves. More...
 
 OnRButtonDown (point, flags)
 Call this function when right mouse is down. More...
 
 OnRButtonUp (point, flags)
 Call this function when right button is up. More...
 
 ResetData ()
 Reset XFA Widget Data. More...
 
 SetCheckState (is_checked)
 Set the checked state of the current XFA widget. More...
 
 SetDefaultValue (value)
 Set the default value string. More...
 
 SetImage (image)
 Set the image for current XFA widget. More...
 
 SetValue (value)
 Set the value string. More...
 

Static Public Member Functions

static static e_HitTestAreaUnknown static e_HitTestAreaClient static e_HitTestAreaTitleBar static e_HitTestAreaHyperLink static e_WidgetTypeBarcode static e_WidgetTypePushButton static e_WidgetTypeCheckButton static e_WidgetTypeArc static e_WidgetTypeDateTimeEdit static e_WidgetTypeNumericEdit static e_WidgetTypeSignature static e_WidgetTypeChoiceList static e_WidgetTypeImageEdit static e_WidgetTypeLine static e_WidgetTypePasswordEdit static e_WidgetTypeRadioButton static e_WidgetTypeRectangle static e_WidgetTypeTextEdit static e_WidgetTypeUnknown static e_WidgetTypeExclGroup static e_WidgetTypeImage static e_PresenceUnknown static e_PresenceVisible static e_PresenceHidden static e_PresenceInactive static e_PresenceInvisible static e_WidgetNameTypeField static e_WidgetNameTypeCaption static e_WidgetNameTypeFullName static e_WidgethAlignTypeCenter static e_WidgethAlignTypeJustify static e_WidgethAlignTypeJustifyAll static e_WidgethAlignTypeLeft static e_WidgethAlignTypeRadix static e_WidgethAlignTypeRight static e_WidgetvAlignTypeTop static e_WidgetvAlignTypeBottom static e_WidgetvAlignTypeMiddle static e_WidgetEdgePositionTop static e_WidgetEdgePositionRight static e_WidgetEdgePositionBottom e_WidgetEdgePositionLeft IsEmpty ()
 Enumeration for hit test area of XFA widget. More...
 

Detailed Description

Class XFAWidget represents the XFA widget which is retrieved from XFA page object.
To access the menu of XFA widget, please construct a WidgetMenu object with XFAWidget object.

See also
WidgetMenu

Member Function Documentation

◆ GetBitmap()

FoxitRDKNative.XFAWidget.GetBitmap ( )

Get the bitmap of current XFA widget.

Applicable only when the type of current XFA widget is XFAWidget.e_WidgetTypeImageEdit or XFAWidget.e_WidgetTypeImage. For types that are not applicable, this function will throw exception e_ErrUnsupported.

Returns
The bitmap of current XFA widget.

◆ GetDefaultValue()

FoxitRDKNative.XFAWidget.GetDefaultValue ( )

Get the default value string.

Returns
The default value string.

◆ GetHAlign()

FoxitRDKNative.XFAWidget.GetHAlign ( )

Get text horizontal alignment.

Returns
Text horizontal alignment. Please refer to values starting from XFAWidget.e_WidgethAlignTypeLeft and this would be one of these values.

◆ GetIndex()

FoxitRDKNative.XFAWidget.GetIndex ( )

Get the index of XFA Widget in related XFA page.

Returns
The index of XFA Widget in related XFA page.

◆ GetName()

FoxitRDKNative.XFAWidget.GetName ( type  )

Get Widget name.

Parameters
[in]typeName type. Please refer to values starting from XFAWidget.e_WidgetNameTypeField and this should be one of these values.
Returns
Widget name string.

◆ GetOptions()

FoxitRDKNative.XFAWidget.GetOptions ( )

Get options of a choice list or an Exclusion Group (for radion button only).

Applicable for choice list and Exclusion Group (for radion button only). For types that are not applicable, this function will return an empty array.

Returns
A choice option array.

◆ GetPresence()

FoxitRDKNative.XFAWidget.GetPresence ( )

Get the presence property of the XFA widget.

The presence property controls the participation of the associated object in different phases of processing.

Returns
The presence property of the XFA widget.

◆ GetRect()

FoxitRDKNative.XFAWidget.GetRect ( )

Get rectangle of XFA widget.

Widget rectangle is defined in XFA coordinate. XFA coordinate is defined as original point in left top, x-axis pointing to right and y-axis pointing down.

Returns
The rectangle of XFA widget.

◆ GetSignature()

FoxitRDKNative.XFAWidget.GetSignature ( )

Get the signature object from current XFA widget.

Applicable only when current XFA widget represents a signature. For types that are not applicable, this function will throw exception e_ErrUnsupported.

Returns
A signature object.

◆ GetToolTip()

FoxitRDKNative.XFAWidget.GetToolTip ( )

Get tooltip string.

Returns
Tooltip string.

◆ GetType()

FoxitRDKNative.XFAWidget.GetType ( )

Get type of XFA widget.

Returns
The XFA widget type. Please refer to values starting from XFAWidget.e_WidgetTypeBarcode and this would be one of these values.

◆ GetVAlign()

FoxitRDKNative.XFAWidget.GetVAlign ( )

Get text vertical alignment.

Returns
Text vertical alignment. Please refer to values starting from XFAWidget.e_WidgetvAlignTypeTop and this would be one of these values.

◆ GetValue()

FoxitRDKNative.XFAWidget.GetValue ( )

Get the value string.

Returns
The value string.

◆ GetXFAPage()

FoxitRDKNative.XFAWidget.GetXFAPage ( )

Get the related XFA page, to which current XFA widget belongs.

Returns
An XFA page object.

◆ HasEdge()

FoxitRDKNative.XFAWidget.HasEdge ( edge_pos  )

Check if the edge for specified position exists.

Parameters
[in]edge_posEdge position to specify which edge will be checked. Please refer to values starting from XFAWidget.e_WidgetEdgePositionTop and this should be one of these values.
Returns
true means that the edge for specified position exists, while false means that no such edge exist.

◆ IsChecked()

FoxitRDKNative.XFAWidget.IsChecked ( )

Check if current XFA widget is checked.

Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will return false.

Returns
true means checked, while false means unchecked or failure.

◆ IsEmpty()

static static e_HitTestAreaUnknown static e_HitTestAreaClient static e_HitTestAreaTitleBar static e_HitTestAreaHyperLink static e_WidgetTypeBarcode static e_WidgetTypePushButton static e_WidgetTypeCheckButton static e_WidgetTypeArc static e_WidgetTypeDateTimeEdit static e_WidgetTypeNumericEdit static e_WidgetTypeSignature static e_WidgetTypeChoiceList static e_WidgetTypeImageEdit static e_WidgetTypeLine static e_WidgetTypePasswordEdit static e_WidgetTypeRadioButton static e_WidgetTypeRectangle static e_WidgetTypeTextEdit static e_WidgetTypeUnknown static e_WidgetTypeExclGroup static e_WidgetTypeImage static e_PresenceUnknown static e_PresenceVisible static e_PresenceHidden static e_PresenceInactive static e_PresenceInvisible static e_WidgetNameTypeField static e_WidgetNameTypeCaption static e_WidgetNameTypeFullName static e_WidgethAlignTypeCenter static e_WidgethAlignTypeJustify static e_WidgethAlignTypeJustifyAll static e_WidgethAlignTypeLeft static e_WidgethAlignTypeRadix static e_WidgethAlignTypeRight static e_WidgetvAlignTypeTop static e_WidgetvAlignTypeBottom static e_WidgetvAlignTypeMiddle static e_WidgetEdgePositionTop static e_WidgetEdgePositionRight static e_WidgetEdgePositionBottom e_WidgetEdgePositionLeft FoxitRDKNative.XFAWidget.IsEmpty ( )
static

Enumeration for hit test area of XFA widget.

Values of this enumeration should be used alone.

Hit test area: Unknown.

Hit test area: Client.

Hit test area: Title Bar.

Hit test area: HyperLink.

Enumeration for the type of XFA widget.

Values of this enumeration should be used alone.

XFA widget type: barcode.

XFA widget type: push button.

XFA widget type: check button.

XFA widget type: arc.

XFA widget type: date time edit.

XFA widget type: numeric edit.

XFA widget type: signature.

XFA widget type: choice list.

XFA widget type: image edit.

XFA widget type: line.

XFA widget type: password edit.

XFA widget type: radio button.

XFA widget type: rectangle.

XFA widget type: text edit.

XFA widget type: unknown.

XFA widget type: Exclusion Group for radio button only.

XFA widget type: image.

Enumeration for presence attribute of XFA widget.

Values of this enumeration should be used alone.
The presence property controls the participation of the associated object in different phases of processing.

Presence property: Unknown.

Presence property: Visible. Participate in interaction, layout, and rendering.

Presence property: Hidden. Participate in interaction but not layout or rendering.

Presence property: Inactive. Do not participate in interaction, layout, or rendering.

Presence property: Invisible. Participate in interaction and layout but not rendering.

Enumeration for the type of XFA widget name.

Values of this enumeration should be used alone.

Name type: field name. Name in this type will be retrieved from XFA widget's name entry and this may an empty string.

Name type: caption name. Name in this type will be retrieved from caption entry.

Name type: full name.

Enumeration for the type of text horizontal alignment of XFA widget.

Values of this enumeration should be used alone.

Center the text horizontally within the available region.

Left-align the last line and spread-justify the rest.

Spread-justify all lines to fill the available region.

Align the text to the left edge of the available region.

Align the radix indicator.

Align the text to the right edge of the available region.

Enumeration for the type of text vertical alignment of XFA widget.

Values of this enumeration should be used alone.

Align the text to the top of the available region.

Align the text to the bottom of the available region.

Align the text so that it is centered between the top and bottom of the available region.

Enumeration for the positon of XFA widget edge position.

Values of this enumeration should be used alone.

Egde position: top.

Egde position: right.

Egde position: bottom.

Egde position: left.

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ IsListBox()

FoxitRDKNative.XFAWidget.IsListBox ( )

Check whether the widget is listbox or not.

Returns
true means the widget is listbox, while false means not.

◆ IsSupportMultiline()

FoxitRDKNative.XFAWidget.IsSupportMultiline ( )

Check whether the widget supports multiple lines.

Only text edit widget which type is XFAWidget.e_WidgetTypeTextEdit supports multiple lines.

Returns
true means the widget is supported, while false means not.

◆ IsSupportMultiSelect()

FoxitRDKNative.XFAWidget.IsSupportMultiSelect ( )

Check whether the widget supports multiple selections.

Only the list box widget supports multiline selections, Whose type is XFAWidget.e_WidgetTypeChoiceList and when the function call XFAWidget.IsListBox returns true.

Returns
true means the widget is supported, while false means not.

◆ OnChar()

FoxitRDKNative.XFAWidget.OnChar ( input_char  ,
flags   
)

Call this function when a character code is being input.

Parameters
[in]input_charA character code, in UTF16-LE encoding.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnHitTest()

FoxitRDKNative.XFAWidget.OnHitTest ( point  )

Call this function to do hit test for a specified point.

Parameters
[in]pointA point to be tested.
Returns
The hit test area. Please refer to values starting from XFAWidget.e_HitTestAreaUnknown and this would be one of these values.

◆ OnKeyDown()

FoxitRDKNative.XFAWidget.OnKeyDown ( key_code  ,
flags   
)

Call this function when key on the keyboard is down.

Parameters
[in]key_codeThe key code. Please refer to values starting from Filler.e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnKeyUp()

FoxitRDKNative.XFAWidget.OnKeyUp ( key_code  ,
flags   
)

Call this function when key on the keyboard is up.

Parameters
[in]key_codeThe key code. Please refer to values starting from Filler.e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDoubleClick()

FoxitRDKNative.XFAWidget.OnLButtonDoubleClick ( point  ,
flags   
)

Call this function when left mouse button is double-clicked .

Parameters
[in]pointA point where left mouse button is double-clicked in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDown()

FoxitRDKNative.XFAWidget.OnLButtonDown ( point  ,
flags   
)

Call this function when left mouse button is down.

Parameters
[in]pointA point where left mouse button is down in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonUp()

FoxitRDKNative.XFAWidget.OnLButtonUp ( point  ,
flags   
)

Call this function when left mouse button is up.

Parameters
[in]pointA point where left mouse button is up in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnMouseEnter()

FoxitRDKNative.XFAWidget.OnMouseEnter ( )

Call this function when mouse enters current XFA widget.

Returns
true means success, while false means failure.

◆ OnMouseExit()

FoxitRDKNative.XFAWidget.OnMouseExit ( )

Call this function when mouse exits.

Returns
true means success, while false means failure.

◆ OnMouseMove()

FoxitRDKNative.XFAWidget.OnMouseMove ( point  ,
flags   
)

Call this function when mouse moves.

Parameters
[in]pointA point where left mouse button moves in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnRButtonDown()

FoxitRDKNative.XFAWidget.OnRButtonDown ( point  ,
flags   
)

Call this function when right mouse is down.

Parameters
[in]pointA point where right mouse button is down in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnRButtonUp()

FoxitRDKNative.XFAWidget.OnRButtonUp ( point  ,
flags   
)

Call this function when right button is up.

Parameters
[in]pointA point where right mouse button is up in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ ResetData()

FoxitRDKNative.XFAWidget.ResetData ( )

Reset XFA Widget Data.

Returns
None.

◆ SetCheckState()

FoxitRDKNative.XFAWidget.SetCheckState ( is_checked  )

Set the checked state of the current XFA widget.

Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will throw exception e_ErrUnsupported.

Parameters
[in]is_checkedtrue means the current XFA widget will be checked, while false means it will not be checked.
Returns
None.

◆ SetDefaultValue()

FoxitRDKNative.XFAWidget.SetDefaultValue ( value  )

Set the default value string.

It is only useful for the XFA widget which type is XFAWidget.e_WidgetTypeTextEdit, XFAWidget.e_WidgetTypeNumericEdit, XFAWidget.e_WidgetTypePasswordEdit or XFAWidget.e_WidgetTypeDateTimeEdit.

Parameters
[in]valueA string as default value to be set. It can be an empty string.
Returns
None.

◆ SetImage()

FoxitRDKNative.XFAWidget.SetImage ( image  )

Set the image for current XFA widget.

Applicable only when the type of current XFA widget is XFAWidget.e_WidgetTypeImageEdit. For types that are not applicable, this function will throw exception e_ErrUnsupported.

Parameters
[in]imageAn image will be set to current XFA widget. Currently, this function only supports the following image types: If try to set rest unsupported image types, exception e_ErrUnsupported will be thrown.
Returns
None.

◆ SetValue()

FoxitRDKNative.XFAWidget.SetValue ( value  )

Set the value string.

It is only useful for the XFA widget which type is XFAWidget.e_WidgetTypeTextEdit, XFAWidget.e_WidgetTypeNumericEdit, XFAWidget.e_WidgetTypePasswordEdit or XFAWidget.e_WidgetTypeDateTimeEdit.

Parameters
[in]valueA string as value to be set. It can be an empty string.
Returns
None.